<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Acceptance/</title>
    <link rel="stylesheet" type="text/css" href="style.css">
  </head>

  <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr><td class="title">Acceptance/</td></tr>
      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>

      <tr>
        <td width="100%">
          <table cellpadding="1" border="0" width="100%">
            <tr>
              <td class="headerItem" width="20%">Current file:</td>
              <td class="headerValue" width="80%"><a href="index.html"></a>/<a href="home.html">home</a>/<a href="home_joona.html">joona</a>/<a href="home_joona_work.html">work</a>/<a href="home_joona_work_Applications_available.html">Applications-available</a>/<a href="home_joona_work_Applications_available_sweatshop_ticket_management.html">sweatshop-ticket-management</a>/<a href="home_joona_work_Applications_available_sweatshop_ticket_management_Source.html">Source</a>/<a href="home_joona_work_Applications_available_sweatshop_ticket_management_Source_Model.html">Model</a>/<a href="home_joona_work_Applications_available_sweatshop_ticket_management_Source_Model_User.php.html">User.php</a></td>
            </tr>
            <tr>
              <td class="legendItem" width="20%">Legend:</td>
              <td class="legendValue" width="80%">
                <span class="legendCov">executed</span>
                <span class="legendNoCov">not executed</span>
                <span class="legendDeadCode">dead code</span>
              </td>
            </tr>
          </table>
        </td>
      </tr>

      <tr>
        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
      </tr>
    </table>

    <br />

    <center>
      <table width="90%" cellpadding="2" cellspacing="1" border="0">
        <tr>
          <td class="tableHead" width="30%">&nbsp;</td>
          <td class="tableHead" colspan="9">Coverage</td>
        </tr>
        <tr>
          <td class="tableHead">&nbsp;</td>
          <td class="tableHead" colspan="3">Classes</td>
          <td class="tableHead" colspan="3">Functions / Methods</td>
          <td class="tableHead" colspan="3">Lines</td>
        </tr>
        <tr>
          <td class="coverItem">Total</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="butter.png" width="50" height="10" alt="50.00%"><img src="snow.png" width="50" height="10" alt="50.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerMed">50.00%</td>
          <td class="coverNumMed">1 / 2</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="73" height="10" alt="73.33%"><img src="snow.png" width="27" height="10" alt="73.33%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">73.33%</td>
          <td class="coverNumHi">11 / 15</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="96" height="10" alt="96.26%"><img src="snow.png" width="4" height="10" alt="96.26%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">96.26%</td>
          <td class="coverNumHi">103 / 107</td>
        </tr>

        <tr>
          <td class="tableHead" colspan="10">&nbsp;</td>
        </tr>
        <tr>
          <td class="coverItem"><b><a href="#8">Model_User</a></b></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerLo">0.00%</td>
          <td class="coverNumLo">0 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="73" height="10" alt="73.33%"><img src="snow.png" width="27" height="10" alt="73.33%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">73.33%</td>
          <td class="coverNumHi">11 / 15</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="96" height="10" alt="96.23%"><img src="snow.png" width="4" height="10" alt="96.23%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">96.23%</td>
          <td class="coverNumHi">102 / 106</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#52">public function __construct($properties)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">6 / 6</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#68">public static function login($username, $password)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">16 / 16</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#97">private static function loginSuccess($properties)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#101">private static function formPassString($username, $password)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#108">public function getId()</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#117">public function save()</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">4 / 4</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#135">public function serializeToArray()</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">7 / 7</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#151">private function create()</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerLo">0.00%</td>
          <td class="coverNumLo">0 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="87" height="10" alt="87.50%"><img src="snow.png" width="13" height="10" alt="87.50%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">87.50%</td>
          <td class="coverNumHi">7 / 8</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#168">private function update()</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerLo">0.00%</td>
          <td class="coverNumLo">0 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="85" height="10" alt="85.71%"><img src="snow.png" width="15" height="10" alt="85.71%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">85.71%</td>
          <td class="coverNumHi">6 / 7</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#185">public function validatePasswords($pw1, $pw2)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerLo">0.00%</td>
          <td class="coverNumLo">0 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="83" height="10" alt="83.33%"><img src="snow.png" width="17" height="10" alt="83.33%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">83.33%</td>
          <td class="coverNumHi">5 / 6</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#197">private function prepareUpdate(&amp;$db)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">12 / 12</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#219">private function prepareInsert(&amp;$db)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">9 / 9</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#235">private function validateUpdate()</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">10 / 10</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#251">private function validateInsert()</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">6 / 6</td>
        </tr>

        <tr>
          <td class="coverFile" colspan="4">&nbsp;<a href="#264">public function deleteUser($userId)</a></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerLo">0.00%</td>
          <td class="coverNumLo">0 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="90" height="10" alt="90.91%"><img src="snow.png" width="10" height="10" alt="90.91%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">90.91%</td>
          <td class="coverNumHi">10 / 11</td>
        </tr>

        <tr>
          <td class="coverItem"><b><a href="#284">Model_User_Exception</a></b></td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="snow.png" width="100" height="10" alt="&nbsp;"><img src="snow.png" width="0" height="10" alt="&nbsp;"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerNone">&nbsp;</td>
          <td class="coverNumNone">&nbsp;</td>
          <td class="coverBar" align="center" width="100">
            <table border="0" cellspacing="0" cellpadding="1">
              <tr>
                <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
              </tr>
            </table>
          </td>
          <td class="coverPerHi">100.00%</td>
          <td class="coverNumHi">1 / 1</td>
        </tr>


      </table>
    </center>

    <br />

    <table cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td><br /></td>
      </tr>
      <tr>
        <td>
<pre class="source">
<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : <span class="default">&lt;?php</span>                                                                                                            
<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                  
<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : <span class="comment">/**</span>                                                                                                              
<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : <span class="comment">&nbsp;*&nbsp;Description&nbsp;of&nbsp;User</span>                                                                                           
<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                : <span class="comment">&nbsp;*</span>                                                                                                               
<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                : <span class="comment">&nbsp;*&nbsp;@author&nbsp;mie</span>                                                                                                   
<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                : <span class="comment">&nbsp;*/</span>                                                                                                              
<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span><span class="lineCov">              1 : <span class="keyword">class</span><span class="default">&nbsp;</span><span class="default">Model_User</span><span class="default">&nbsp;</span><span class="keyword">extends</span><span class="default">&nbsp;</span><span class="default">Core_Model</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                            </span>
<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Salt&nbsp;used&nbsp;in&nbsp;calculating&nbsp;password-hash</span>                                                                    
<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">const</span><span class="default">&nbsp;</span><span class="default">PASS_SALT</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">'suola'</span><span class="keyword">;</span>                                                                                   
<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$insertQuery</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">'INSERT&nbsp;INTO&nbsp;User</span>                                                                     
<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(username,&nbsp;password,&nbsp;email,&nbsp;userStatusId,&nbsp;userGroupId)&nbsp;VALUES</span>                                            
<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;{username},&nbsp;md5({password}),&nbsp;{email},&nbsp;{userStatusId},&nbsp;{userGroupId})'</span><span class="keyword">;</span>                                 
<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :                                                                                                                  
<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$updateQueryWithPassword</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">'UPDATE&nbsp;User&nbsp;SET</span>                                                          
<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username&nbsp;=&nbsp;{username},&nbsp;password&nbsp;=&nbsp;md5({password}),</span>                                               
<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email&nbsp;=&nbsp;{email},&nbsp;userStatusId&nbsp;=&nbsp;{userStatusId},</span>                                                  
<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userGroupId&nbsp;=&nbsp;{userGroupId}</span>                                                                      
<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;id&nbsp;=&nbsp;{id}&nbsp;LIMIT&nbsp;1'</span><span class="keyword">;</span>                                                                            
<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$updateQueryWithoutPassword</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">'UPDATE&nbsp;User&nbsp;SET</span>                                                       
<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username&nbsp;=&nbsp;{username},&nbsp;email&nbsp;=&nbsp;{email},</span>                                                          
<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userStatusId&nbsp;=&nbsp;{userStatusId},&nbsp;userGroupId&nbsp;=&nbsp;{userGroupId}</span>                                       
<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;id&nbsp;=&nbsp;{id}&nbsp;LIMIT&nbsp;1'</span><span class="keyword">;</span>                                                                            
<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :                                                                                                                  
<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$id</span><span class="keyword">;</span>                                                                                                 
<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$username</span><span class="keyword">;</span>                                                                                           
<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$email</span><span class="keyword">;</span>                                                                                              
<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$userStatusId</span><span class="keyword">;</span>                                                                                       
<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$userGroupId</span><span class="keyword">;</span>                                                                                        
<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$password</span><span class="keyword">;</span>                                                                                           
<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$password2</span><span class="keyword">;</span>                                                                                          
<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$insertRules</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="keyword">array</span>                                                                                 
<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">(</span>                                                                                                        
<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'username'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span><span class="keyword">,</span>                                               
<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'password'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span><span class="keyword">,</span>                                               
<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'email'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span><span class="keyword">,</span>                                                  
<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'userStatusId'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_Int</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">'minValue'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">1</span><span class="keyword">)</span><span class="keyword">,</span>                             
<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'userGroupId'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_Int</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">'minValue'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">1</span><span class="keyword">)</span>                               
<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                                           
<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="default">$updateRules</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="keyword">array</span>                                                                                 
<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">(</span>                                                                                                        
<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'id'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_Int</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">'minValue'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">1</span><span class="keyword">)</span><span class="keyword">,</span>                                       
<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'username'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span><span class="keyword">,</span>                                               
<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'password'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span><span class="keyword">,</span>                                               
<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'email'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span><span class="keyword">,</span>                                                  
<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'userStatusId'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_Int</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">'minValue'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">1</span><span class="keyword">)</span><span class="keyword">,</span>                             
<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'userGroupId'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_Int</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">'minValue'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">1</span><span class="keyword">)</span>                               
<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                                           
<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :                                                                                                                  
<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">__construct</span><span class="keyword">(</span><span class="default">$properties</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                   
<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span><span class="lineCov">              5 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$className</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">get_class</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">)</span><span class="keyword">;</span>                                                                           </span>
<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span><span class="lineCov">              5 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">foreach</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">$properties</span><span class="default">&nbsp;</span><span class="keyword">as</span><span class="default">&nbsp;</span><span class="default">$name</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">$value</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                               </span>
<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">property_exists</span><span class="keyword">(</span><span class="default">$className</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$name</span><span class="keyword">)</span><span class="keyword">)</span>                                                              </span>
<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">$name</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">$value</span><span class="keyword">;</span>                                                                           </span>
<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span><span class="lineCov">              5 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                        </span>
<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span><span class="lineCov">              5 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :                                                                                                                  
<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Login&nbsp;as&nbsp;an&nbsp;existing&nbsp;user.</span>                                                                                
<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span>                                                                                                           
<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;$username</span>                                                                                          
<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;$password</span>                                                                                          
<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;Model_User&nbsp;on&nbsp;success,&nbsp;nothing&nbsp;on&nbsp;failure.</span>                                                        
<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Core_Database_Exception&nbsp;on&nbsp;SQL&nbsp;error</span>                                                              
<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">static</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">login</span><span class="keyword">(</span><span class="default">$username</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$password</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                         
<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">Core_Logger</span><span class="keyword">::</span><span class="default">log</span><span class="keyword">(</span><span class="string">&quot;</span><span class="string">loggin&nbsp;in:&nbsp;</span><span class="string">$username</span><span class="string">,&nbsp;</span><span class="string">&quot;</span><span class="default">&nbsp;</span><span class="keyword">.</span><span class="default">&nbsp;</span><span class="default">str_repeat</span><span class="keyword">(</span><span class="default">'x'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">strlen</span><span class="keyword">(</span><span class="default">$password</span><span class="keyword">)</span><span class="keyword">)</span><span class="keyword">)</span><span class="keyword">;</span>                         </span>
<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">getDatabaseHandler</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                        </span>
<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$rules</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="keyword">array</span>                                                                                           
<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">(</span>                                                                                                    
<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'username'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span><span class="keyword">,</span>                                           </span>
<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'password'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span><span class="default">'type'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">Core_Database</span><span class="keyword">::</span><span class="default">Type_String</span><span class="keyword">)</span>                                            </span>
<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                                       </span>
<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setRules</span><span class="keyword">(</span><span class="default">$rules</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                   </span>
<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">prepare</span><span class="keyword">(</span><span class="default">'select&nbsp;id,&nbsp;username&nbsp;from&nbsp;User&nbsp;where&nbsp;username&nbsp;=&nbsp;{username}&nbsp;and&nbsp;password&nbsp;=&nbsp;md5({password})'</span><span class="keyword">)</span><span class="keyword">;</span></span>
<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'username'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$username</span><span class="keyword">)</span><span class="keyword">;</span>                                                                </span>
<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$password</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">formPassString</span><span class="keyword">(</span><span class="default">$username</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$password</span><span class="keyword">)</span><span class="keyword">;</span>                                                  </span>
<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'password'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$password</span><span class="keyword">)</span><span class="keyword">;</span>                                                                </span>
<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">execute</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                          </span>
<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :                                                                                                                  
<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">fetch</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                      </span>
<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">Core_Logger</span><span class="keyword">::</span><span class="default">log</span><span class="keyword">(</span><span class="string">&quot;</span><span class="string">$username</span><span class="string">&nbsp;logged&nbsp;in</span><span class="string">&quot;</span><span class="keyword">)</span><span class="keyword">;</span>                                                             </span>
<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">loginSuccess</span><span class="keyword">(</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">getResult</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">)</span><span class="keyword">;</span>                                                         </span>
<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span><span class="default">&nbsp;</span><span class="keyword">else</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                                 </span>
<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">Core_Logger</span><span class="keyword">::</span><span class="default">log</span><span class="keyword">(</span><span class="string">&quot;</span><span class="string">$username</span><span class="string">&nbsp;failed&nbsp;to&nbsp;log&nbsp;in</span><span class="string">&quot;</span><span class="keyword">)</span><span class="keyword">;</span>                                                      </span>
<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                        
<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :                                                                                                                  
<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;After&nbsp;succesful&nbsp;login</span>                                                                                     
<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span>                                                                                                           
<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;$properties&nbsp;Logged&nbsp;user&nbsp;array</span>                                                                      
<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;Model_User</span>                                                                                        
<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">static</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">loginSuccess</span><span class="keyword">(</span><span class="default">$properties</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                          
<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User</span><span class="keyword">(</span><span class="default">$properties</span><span class="keyword">)</span><span class="keyword">;</span>                                                                      </span>
<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                                  
<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">static</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">formPassString</span><span class="keyword">(</span><span class="default">$username</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$password</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                               
<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span><span class="lineCov">              5 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="default">$username</span><span class="default">&nbsp;</span><span class="keyword">.</span><span class="default">&nbsp;</span><span class="default">$password</span><span class="default">&nbsp;</span><span class="keyword">.</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">PASS_SALT</span><span class="keyword">;</span>                                                          </span>
<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :                                                                                                                  
<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;getter&nbsp;for&nbsp;Id</span>                                                                                             
<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">getId</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                    
<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="keyword">;</span>                                                                                        </span>
<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :                                                                                                                  
<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Save&nbsp;user&nbsp;to&nbsp;Database</span>                                                                                     
<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;$user&nbsp;User&nbsp;information&nbsp;in&nbsp;array&nbsp;(id&nbsp;=&gt;&nbsp;#,&nbsp;username&nbsp;=&gt;&nbsp;'',&nbsp;...)</span>                                    
<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Model_User_Exception&nbsp;on&nbsp;error</span>                                                                     
<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">save</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                     
<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span><span class="lineCov">              3 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="keyword">)</span>                                                                                           </span>
<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span><span class="lineCov">              3 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">update</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                     </span>
<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">else</span>                                                                                                     
<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">create</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                     </span>
<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span><span class="lineCov">              3 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :                                                                                                                  
<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Rerturn&nbsp;user&nbsp;information&nbsp;on&nbsp;PHP&nbsp;array</span>                                                                     
<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;$user&nbsp;User&nbsp;information&nbsp;in&nbsp;array(</span>                                                                  
<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;=&gt;&nbsp;this-&gt;id,</span>                                                                                      
<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username&nbsp;=&gt;&nbsp;this-&gt;username,</span>                                                                          
<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email&nbsp;=&gt;&nbsp;this-&gt;email,</span>                                                                                
<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userGroupId&nbsp;=&gt;&nbsp;this-&gt;userGroupId,</span>                                                                    
<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userStatusId&nbsp;=&gt;&nbsp;this-&gt;userStatusId,</span>                                                                  
<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...</span>                                                                                                  
<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;)</span>                                                                                                         
<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">serializeToArray</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                         
<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">return</span><span class="default">&nbsp;</span><span class="keyword">array</span><span class="keyword">(</span>                                                                                            
<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'id'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="keyword">,</span>                                                                                   </span>
<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'username'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">username</span><span class="keyword">,</span>                                                                       </span>
<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'email'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">email</span><span class="keyword">,</span>                                                                             </span>
<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'userGroupId'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userGroupId</span><span class="keyword">,</span>                                                                 </span>
<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'userStatusId'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userStatusId</span><span class="keyword">,</span>                                                               </span>
<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'password'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">''</span><span class="keyword">,</span>                                                                                    </span>
<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'password2'</span><span class="default">&nbsp;</span><span class="keyword">=&gt;</span><span class="default">&nbsp;</span><span class="default">''</span>                                                                                    
<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span><span class="lineCov">              4 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                                       </span>
<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span><span class="lineDeadCode">                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :                                                                                                                  
<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Create&nbsp;new&nbsp;User&nbsp;to&nbsp;system,&nbsp;username&nbsp;and&nbsp;password&nbsp;must&nbsp;be&nbsp;set</span>                                              
<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Model_User_Exception&nbsp;on&nbsp;error</span>                                                                     
<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">create</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                  
<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">try</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                                    
<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">validateInsert</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                             </span>
<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">getDatabaseHandler</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                    </span>
<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">prepareInsert</span><span class="keyword">(</span><span class="default">$db</span><span class="keyword">)</span><span class="keyword">;</span>                                                                           </span>
<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">execute</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                      </span>
<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">insertId</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                         </span>
<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span><span class="default">&nbsp;</span><span class="keyword">catch</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">Model_User_Exception</span><span class="default">&nbsp;</span><span class="default">$e</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                      </span>
<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Unable&nbsp;to&nbsp;create&nbsp;user:&nbsp;'</span><span class="default">&nbsp;</span><span class="keyword">.</span><span class="default">&nbsp;</span><span class="default">$e</span><span class="keyword">-&gt;</span><span class="default">getMessage</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">)</span><span class="keyword">;</span>                        </span>
<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                        
<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :                                                                                                                  
<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Update&nbsp;existing&nbsp;User&nbsp;to&nbsp;system</span>                                                                            
<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;password&nbsp;and&nbsp;password2&nbsp;are&nbsp;set,&nbsp;password&nbsp;is&nbsp;also&nbsp;updated</span>                                               
<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Model_User_Exception&nbsp;on&nbsp;error</span>                                                                     
<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">update</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                  
<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">try</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                                                    
<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">validateUpdate</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                             </span>
<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">getDatabaseHandler</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                    </span>
<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">prepareUpdate</span><span class="keyword">(</span><span class="default">$db</span><span class="keyword">)</span><span class="keyword">;</span>                                                                           </span>
<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">execute</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                      </span>
<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span><span class="default">&nbsp;</span><span class="keyword">catch</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">Model_User_Exception</span><span class="default">&nbsp;</span><span class="default">$e</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                      </span>
<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Unable&nbsp;to&nbsp;update&nbsp;user:&nbsp;'</span><span class="default">&nbsp;</span><span class="keyword">.</span><span class="default">&nbsp;</span><span class="default">$e</span><span class="keyword">-&gt;</span><span class="default">getMessage</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">)</span><span class="keyword">;</span>                        </span>
<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                        
<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :                                                                                                                  
<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Validate&nbsp;that&nbsp;password&nbsp;are&nbsp;equal&nbsp;and&nbsp;meet&nbsp;complexity&nbsp;requirements</span>                                         
<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;$pw1&nbsp;Password&nbsp;1</span>                                                                                    
<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;$pw2&nbsp;Password&nbsp;2</span>                                                                                    
<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Model_User_Exception&nbsp;if&nbsp;passwords&nbsp;are&nbsp;invalid</span>                                                     
<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">validatePasswords</span><span class="keyword">(</span><span class="default">$pw1</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$pw2</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                              
<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">$pw1</span><span class="default">&nbsp;</span><span class="keyword">!==</span><span class="default">&nbsp;</span><span class="default">$pw2</span><span class="keyword">)</span>                                                                                       </span>
<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Passwords&nbsp;mismatch'</span><span class="keyword">)</span><span class="keyword">;</span>                                                </span>
<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">else</span><span class="default">&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="default">preg_match</span><span class="keyword">(</span><span class="default">&quot;/^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/&quot;</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$pw1</span><span class="keyword">)</span><span class="keyword">)</span>                           </span>
<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span>                                                                      </span>
<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">'Weak&nbsp;password,&nbsp;must&nbsp;be&nbsp;8&nbsp;characters&nbsp;with&nbsp;a&nbsp;capital&nbsp;and&nbsp;small&nbsp;letter&nbsp;and&nbsp;digit'</span><span class="keyword">)</span><span class="keyword">;</span>            </span>
<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :                                                                                                                  
<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Prepare&nbsp;the&nbsp;database&nbsp;query&nbsp;and&nbsp;bind&nbsp;variables&nbsp;for&nbsp;creaging&nbsp;new&nbsp;user</span>                                       
<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;$db&nbsp;Database&nbsp;handler&nbsp;as&nbsp;reference</span>                                                                  
<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">prepareUpdate</span><span class="keyword">(</span><span class="keyword">&amp;</span><span class="default">$db</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                       
<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setRules</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">updateRules</span><span class="keyword">)</span><span class="keyword">;</span>                                                                       </span>
<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$updatePW</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">strlen</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">&gt;</span><span class="default">&nbsp;</span><span class="default">1</span><span class="keyword">;</span>                                                                 </span>
<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">$updatePW</span><span class="keyword">)</span>                                                                                           
<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">prepare</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">updateQueryWithPassword</span><span class="keyword">)</span><span class="keyword">;</span>                                                        </span>
<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">else</span>                                                                                                     
<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">prepare</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">updateQueryWithoutPassword</span><span class="keyword">)</span><span class="keyword">;</span>                                                     </span>
<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :                                                                                                                  
<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'username'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">username</span><span class="keyword">)</span><span class="keyword">;</span>                                                          </span>
<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password2</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">formPassString</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">username</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password</span><span class="keyword">)</span><span class="keyword">;</span>                               </span>
<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">$updatePW</span><span class="keyword">)</span>                                                                                           
<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'password'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password2</span><span class="keyword">)</span><span class="keyword">;</span>                                                     </span>
<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'email'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">email</span><span class="keyword">)</span><span class="keyword">;</span>                                                                </span>
<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'userStatusId'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userStatusId</span><span class="keyword">)</span><span class="keyword">;</span>                                                  </span>
<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'userGroupId'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userGroupId</span><span class="keyword">)</span><span class="keyword">;</span>                                                    </span>
<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'id'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="keyword">)</span><span class="keyword">;</span>                                                                      </span>
<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span>                :                                                                                                                  
<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Prepare&nbsp;the&nbsp;database&nbsp;query&nbsp;and&nbsp;bind&nbsp;variables</span>                                                             
<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;$db&nbsp;Database&nbsp;handler&nbsp;as&nbsp;reference&nbsp;</span>                                                                  
<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">prepareInsert</span><span class="keyword">(</span><span class="keyword">&amp;</span><span class="default">$db</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                       
<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setRules</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">insertRules</span><span class="keyword">)</span><span class="keyword">;</span>                                                                       </span>
<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">prepare</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">insertQuery</span><span class="keyword">)</span><span class="keyword">;</span>                                                                        </span>
<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'username'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">username</span><span class="keyword">)</span><span class="keyword">;</span>                                                          </span>
<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password2</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">formPassString</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">username</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password</span><span class="keyword">)</span><span class="keyword">;</span>                               </span>
<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'password'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password2</span><span class="keyword">)</span><span class="keyword">;</span>                                                         </span>
<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'email'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">email</span><span class="keyword">)</span><span class="keyword">;</span>                                                                </span>
<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'userStatusId'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userStatusId</span><span class="keyword">)</span><span class="keyword">;</span>                                                  </span>
<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'userGroupId'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userGroupId</span><span class="keyword">)</span><span class="keyword">;</span>                                                    </span>
<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span>                :                                                                                                                  
<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Check&nbsp;that&nbsp;object&nbsp;has&nbsp;all&nbsp;variables&nbsp;set&nbsp;in&nbsp;order&nbsp;to&nbsp;update</span>                                                
<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;password&nbsp;is&nbsp;given&nbsp;it&nbsp;is&nbsp;validated&nbsp;against&nbsp;password2</span>                                                    
<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Model_User_Exception</span>                                                                              
<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">validateUpdate</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                          
<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="keyword">)</span>                                                                                          </span>
<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Missing&nbsp;ID'</span><span class="keyword">)</span><span class="keyword">;</span>                                                        </span>
<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">username</span><span class="keyword">)</span>                                                                                    </span>
<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Missing&nbsp;username'</span><span class="keyword">)</span><span class="keyword">;</span>                                                  </span>
<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">email</span><span class="keyword">)</span>                                                                                       </span>
<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Missing&nbsp;email'</span><span class="keyword">)</span><span class="keyword">;</span>                                                     </span>
<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">strlen</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">&gt;</span><span class="default">&nbsp;</span><span class="default">1</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                       </span>
<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">validatePasswords</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password2</span><span class="keyword">)</span><span class="keyword">;</span>                                         </span>
<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                        </span>
<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">              2 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :                                                                                                                  
<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Check&nbsp;that&nbsp;object&nbsp;has&nbsp;all&nbsp;variables&nbsp;set&nbsp;in&nbsp;order&nbsp;to&nbsp;insert</span>                                                
<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Model_User_Exception</span>                                                                              
<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">private</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">validateInsert</span><span class="keyword">(</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                          
<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">username</span><span class="keyword">)</span>                                                                                    </span>
<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Missing&nbsp;username'</span><span class="keyword">)</span><span class="keyword">;</span>                                                  </span>
<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">if</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="keyword">!</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">email</span><span class="keyword">)</span>                                                                                       </span>
<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Missing&nbsp;email'</span><span class="keyword">)</span><span class="keyword">;</span>                                                     </span>
<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">validatePasswords</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">password2</span><span class="keyword">)</span><span class="keyword">;</span>                                             </span>
<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span>                :                                                                                                                  
<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">/**</span>                                                                                                          
<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Remove&nbsp;(chage&nbsp;status&nbsp;to&nbsp;removed)&nbsp;a&nbsp;user&nbsp;from&nbsp;system</span>                                                       
<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;INTEGER&nbsp;$userId</span>                                                                                    
<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@throws&nbsp;Model_User_Exception&nbsp;on&nbsp;SQL-error</span>                                                                 
<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span>                : <span class="comment">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span>                                                                                                          
<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span class="default">&nbsp;</span><span class="keyword">function</span><span class="default">&nbsp;</span><span class="default">deleteUser</span><span class="keyword">(</span><span class="default">$userId</span><span class="keyword">)</span>                                                                          
<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">{</span>                                                                                                            
<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">getDatabaseHandler</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                         </span>
<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">try</span>                                                                                                      
<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">{</span>                                                                                                        
<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">$userId</span><span class="keyword">;</span>                                                                                 </span>
<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userStatusId</span><span class="default">&nbsp;</span><span class="keyword">=</span><span class="default">&nbsp;</span><span class="default">self</span><span class="keyword">::</span><span class="default">USER_STATUS_REMOVED</span><span class="keyword">;</span>                                                     </span>
<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span>                :                                                                                                                  
<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setRules</span><span class="keyword">(</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">updateRules</span><span class="keyword">)</span><span class="keyword">;</span>                                                                   </span>
<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">prepare</span><span class="keyword">(</span><span class="default">'UPDATE&nbsp;User&nbsp;set&nbsp;userStatusId&nbsp;=&nbsp;{userStatusId}&nbsp;WHERE&nbsp;id&nbsp;=&nbsp;{id}'</span><span class="keyword">)</span><span class="keyword">;</span>                       </span>
<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'userStatusId'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">userStatusId</span><span class="keyword">)</span><span class="keyword">;</span>                                              </span>
<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">setParameter</span><span class="keyword">(</span><span class="default">'id'</span><span class="keyword">,</span><span class="default">&nbsp;</span><span class="default">$this</span><span class="keyword">-&gt;</span><span class="default">id</span><span class="keyword">)</span><span class="keyword">;</span>                                                                  </span>
<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="default">$db</span><span class="keyword">-&gt;</span><span class="default">execute</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">;</span>                                                                                      </span>
<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span><span class="default">&nbsp;</span><span class="keyword">catch</span><span class="default">&nbsp;</span><span class="keyword">(</span><span class="default">Model_User_Exception</span><span class="default">&nbsp;</span><span class="default">$e</span><span class="keyword">)</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                                      </span>
<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span><span class="lineNoCov">              0 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">throw</span><span class="default">&nbsp;</span><span class="keyword">new</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="keyword">(</span><span class="default">'Unable&nbsp;to&nbsp;update&nbsp;user:&nbsp;'</span><span class="default">&nbsp;</span><span class="keyword">.</span><span class="default">&nbsp;</span><span class="default">$e</span><span class="keyword">-&gt;</span><span class="default">getMessage</span><span class="keyword">(</span><span class="keyword">)</span><span class="keyword">)</span><span class="keyword">;</span>                        </span>
<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span>                : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                        
<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span><span class="lineCov">              1 : <span class="default">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">}</span>                                                                                                            </span>
<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span>                :                                                                                                                  
<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span>                : <span class="keyword">}</span>                                                                                                                
<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span>                :                                                                                                                  
<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span><span class="lineCov">              1 : <span class="keyword">class</span><span class="default">&nbsp;</span><span class="default">Model_User_Exception</span><span class="default">&nbsp;</span><span class="keyword">extends</span><span class="default">&nbsp;</span><span class="default">Core_Exception</span><span class="default">&nbsp;</span><span class="keyword">{</span>                                                              </span>
<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span>                :                                                                                                                  

</pre>
        </td>
      </tr>
    </table>

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
      <tr><td class="versionInfo">Generated by <a href="http://www.phpunit.de/">PHPUnit 3.4.13</a> and <a href="http://www.xdebug.org/">Xdebug 2.1.0</a> at Mon May 23 9:55:33 EEST 2011.</td></tr>
    </table>

    <br />
  </body>
</html>
